package cn.tom.tompicturebackend.exception;

import lombok.Getter;

@Getter
public enum ErrorCode {
    SUCCESS(0, "成功"),
    PARAMS_ERROR(400000,"参数错误"),
    NOT_LOGIN_ERROR(400001,"未登录"),
    NOT_AUTHORIZED_ERROR(400002,"无权限"),
    NOT_FOUND_ERROR(400003,"资源不存在"),
    FORBIDDEN_ERROR(400004,"禁止访问"),
    SYSTEM_ERROR(500000,"系统错误"),
    OPERATION_ERROR(500001,"操作失败"),
    NO_AUTH_ERROR(500002,"无权限访问");

    /**
     * 状态码
     */
    private final int code;
    /**
     * 错误信息
     */
    private final String message;

     ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
